<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Include file of bottom scripts</title>
    </h:head>
    <h:body>
        <ui:composition>
            <script src="js/libs/jquery.ui.touch.js" type="text/javascript"></script>
            <script src="js/libs/QapTcha.jquery.min.js" type="text/javascript"></script>

            <script>
                /* Initialize QapTcha */
                $(document).ready(function(){
                    $('.QapTcha').QapTcha(
                    {disabledSubmit:false,
                        autoRevert:true,
                        autoSubmit:false,
                        PHPfile:'qaptcha',
                        txtLock:'You can\'t submit. Please unlock captcha.',
                        txtUnlock:''
                    });
                });
                
                setInterval(
                    function() {
                        $.ajax('#{request.contextPath}/__ping');
                    }, 1000*60);

            </script>


            <!-- Google Analytics -->
            <script type="text/javascript">

                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', 'UA-36891499-1']);
                _gaq.push(['_trackPageview']);

                (function() {
                    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();

            </script>

        </ui:composition>
    </h:body>
</html>